#include "progress.h"
void progress(double current,double total)
{
    double cur_progress = current/total*100;
    char bar[101] = {'\0'};
    int bar_count = (int)cur_progress;
    for(int i = 0;i < bar_count;i++)
        bar[i] = '#';
    const char* cnt = "|/-\\";
    static int count = 0;
    printf("[%-100s][%.1lf%%][%c]\r",bar,cur_progress,cnt[count%4]);
    fflush(stdout);
    count++;
}
